package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.DmcCsunButtonLocation;
import com.csun.cmny.provider.model.dto.button.BindCsunButtonLocationDto;
import com.csun.cmny.provider.model.dto.button.CsunButtonPageQuery;
import com.csun.cmny.provider.model.dto.csunbutton.BedOldmanCsunButtonReqDto;
import com.csun.cmny.provider.model.dto.propertyManagement.SelectDeviceDataDto;
import com.csun.cmny.provider.model.vo.CsunButtonReqVo;
import com.csun.cmny.provider.model.vo.csunbutton.DmcCsunButtonVo;
import com.csun.cmny.provider.model.vo.propertyManagement.PropertyDataVo;
import com.github.pagehelper.PageInfo;

import java.util.Map;
import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-02-11 20:04
 * @Description: the interface dmc csun button location service
 */
public interface DmcCsunButtonLocationService extends IService<DmcCsunButtonLocation> {

    /**
     * bind csun button location
     *
     * @param bindCsunButtonLocationDto bind csun button location dto
     * @param loginAuthDto              login auth dto
     *
     * @return  the int.
     */
    Integer bindCsunButtonLocation(BindCsunButtonLocationDto bindCsunButtonLocationDto,
                                   LoginAuthDto loginAuthDto);

    /**
     * break csun button location
     *
     * @param deviceId  device id
     *
     * @return  the int.
     */
    Integer breakCsunButtonLocation(Long deviceId);

    /**
     * query csun button list with page
     *
     * @param csunButtonPageQuery   csun button page query
     *
     * @return  the page info.
     */
    PageInfo queryGroupCsunButtonListWithPage(CsunButtonPageQuery csunButtonPageQuery);

    /**
     * get csun button by device id
     *
     * @param deviceId  device id
     *
     * @return  dmc csun button vo
     */
    DmcCsunButtonVo getCsunButtonByDeviceId(Long deviceId);

    /**
     * get csun button by device id
     *
     * @param deviceNo  device no
     *
     * @return  dmc csun button vo
     */
    DmcCsunButtonVo getCsunButtonByDeviceNo(String deviceNo);

    /**
     * get csun button by oldman id
     *
     * @param oldmanId  oldman id
     *
     * @return  dmc csun button vo
     */
    DmcCsunButtonVo getCsunButtonByOldmanId(Integer oldmanId);

    /**
     * delete csun button by id
     *
     * @param id    id
     *
     * @return  the int
     */
    Integer deleteCsunButtonById(Long id);

    /**
     * @description: TODO
     * @param: oldmanId 老人ID
     * @return: 老人最近一次报警数据
     * @throws
     * @author huangxm
     * @date 2019/3/15 13:39
     */
    Map<String,Object> getRecentData(Integer oldmanId);


    /**
     * query csun button by bed oldman list
     *
     * @param bedOldmanCsunButtonReqDtoList bed oldman csun button req dto list
     *
     * @return  the lis.
     */
    List<CsunButtonReqVo> queryCsunButtonByBedOldmanList(List<BedOldmanCsunButtonReqDto> bedOldmanCsunButtonReqDtoList);

    List<PropertyDataVo> selectDeviceData(SelectDeviceDataDto selectDeviceDataDto);
    //查询该设备报警时间间隔
    DmcCsunButtonVo queryGroupCsunButton(CsunButtonPageQuery csunButtonPageQuery);
    /**
     * 添加紧急按钮报警时间
     */
    Integer updateAlarmTime(DmcCsunButtonLocation dmcCsunButton);
}
